package com.ny.controller;

import com.ny.entity.Result;
import com.ny.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DeviceController {
    @Autowired
    private DeviceService deviceService;

    // 查询所有设备信息:http://localhost:8081/findAll
    @GetMapping("/findAll")
    public Result findAll(){
        return Result.success(deviceService.findAll());
    }

}
